package com.zgq.share.widget;

import com.zgq.share.ui.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

/**
 * 菜单导航 Tab控件bean
 *
 */
public class ShareTabIndicator extends RelativeLayout {


	
	/**
	 * 显示文字文本控件
	 */
	private TextView txt;
	
	private RelativeLayout lay;

	/**
	 * 构造方法
	 * @param context 上下文
	 * @param label 显示文字
	 * @param iconId 图标ID
	 */
	public ShareTabIndicator(Context context, String label, int iconId) {
		super(context);
		View tab = LayoutInflater.from(context).inflate(R.layout.share_tab_indicator, this);
		lay = (RelativeLayout) tab.findViewById(R.id.lay_tab);
		lay.setBackgroundResource(iconId);

		txt = (TextView)tab.findViewById(R.id.tab_label);
		txt.setText(label);
	}


	public TextView getTxt() {
		return txt;
	}

	public void setText(String label) {
		txt.setText(label);
	}

	public RelativeLayout getLay() {
		return lay;
	}

	public void setLay(RelativeLayout lay) {
		this.lay = lay;
	}

	
}
